/**
 * 清空cookies信息
 * @param name
 * @param path
 * @param domain
 */
export function clearCookie(name: string, path = '/', domain = '') {
  const secureStr = location.protocol === 'https:' ? '; secure' : ''
  document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:00 GMT${secureStr}; path=${path}${domain ? `; domain=${domain}` : ''}`
}
